#!/usr/bin/env python 
# -*- coding: utf-8 -*-
# @Time    : 2022/9/28 8:28
# @Author  : Junzhao
# @File    : classes.py
# @Software: PyCharm
class Animal:

    # def __init__(self):
    #     """默认调用的是这个"""
    #     pass

    def __init__(self, name, color, sex):
        """可以自己声明一个"""
        self.name = name
        self.color = color
        self.sex = sex

    def info(self):
        return "名字：" + self.name + "\t" + \
               "颜色：" + self.color + "\t" + \
               "性别：" + self.sex

    def speak(self):
        print(f"{self.name}可以叫")
        pass


# a = Animal()]
# print(a.sex)

# 实例化
dog = Animal("a", "red", "male")
print(dog)  # 这样打印的是地址值
print(dog.info())
print(dog is Animal)
# issubclass(dog, Animal)
print(isinstance(dog, Animal))
